package StudentManagerSystem1;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

public class App {
    public static void main(String[] args) throws IOException {
        ArrayList<User> userList = new ArrayList<>();
        Scanner s = new Scanner(System.in);
        while (true) {
            menu();
            System.out.println("请输入你的选择：");
            String choice = s.nextLine();
            switch (choice) {
                case "1" -> new Login();
                case "2" -> new register();
                case "3" -> new ForgetPassword();
                case "4" -> {
                    System.out.println("欢迎使用学生管理系统，再见！");
                    System.exit(0);
                }
                default -> System.out.println("输入有误，请重新输入！");
            }
        }
    }

    public static void menu() {
        System.out.println("------------------------------欢迎来到学生管理系统------------------------------");
        System.out.println("--------------1.登   录----------------");
        System.out.println("--------------2.注   册----------------");
        System.out.println("--------------3.忘记密码----------------");
        System.out.println("--------------4.退出系统----------------");
        System.out.println("----------------------------------------------------------------------------");
    }
}
